<template>
  <div class="q-pa-md">
    <div class="q-gutter-sm row">
      <t-input filled v-model="time" mask="time" :rules="['time']">
        <template v-slot:append>
          <t-icon name="access_time" class="cursor-pointer">
            <t-popup-proxy
              cover
              transition-show="scale"
              transition-hide="scale"
            >
              <t-time v-model="time">
                <div class="row items-center justify-end">
                  <t-btn v-close-popup label="Close" color="primary" flat />
                </div>
              </t-time>
            </t-popup-proxy>
          </t-icon>
        </template>
      </t-input>

      <t-input
        filled
        v-model="timeWithSeconds"
        mask="fulltime"
        :rules="['fulltime']"
      >
        <template v-slot:append>
          <t-icon name="access_time" class="cursor-pointer">
            <t-popup-proxy
              cover
              transition-show="scale"
              transition-hide="scale"
            >
              <t-time v-model="timeWithSeconds" with-seconds format24h>
                <div class="row items-center justify-end">
                  <t-btn v-close-popup label="Close" color="primary" flat />
                </div>
              </t-time>
            </t-popup-proxy>
          </t-icon>
        </template>
      </t-input>
    </div>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        time: ref('10:56'),
        timeWithSeconds: ref('10:56:00'),
      };
    },
  };
</script>
